﻿#pragma once

#include <QtWidgets/QMainWindow>
#include "ui_tcms.h"
#include <qlist.h>
#include <qstringlist.h>
#include <UserManagerForm.h>
#include<Tool/UserInfo.h>
#include<QLabel>
class QTreeWidget;
class QWidget;
class QLineEdit;
class DDUMsgTest;
class NetConfigForm;
class FormMvb;
class FormEKE;
class TCMS : public QMainWindow
{
    Q_OBJECT

public:
    TCMS(QWidget *parent = Q_NULLPTR);
    ~TCMS();
    void CreateToolBar();
    void SetRecentUser(const UserInfo& userInfo);
private:
    void ConnectSinalsAndSlots();
    void InitUI();
    void InitStatus();
    void updateStatus(const UserInfo& userinfo);
private:
    Ui::TCMS ui;


    DDUMsgTest *dduMsgTest= nullptr;        //DDU测试
    NetConfigForm *netconfigform = nullptr; //配置界面
    FormMvb* formMvb = nullptr;     //mvb测试
    FormEKE* formEKE = nullptr;     //EKE
    UserManagerForm* m_formManager = nullptr;
    QLabel *m_UserName=nullptr;
    QLabel *m_UserLevel=nullptr;
    UserInfo m_recentUser;
private slots:

    void ShowEditTrdp();
    void ShowDDUTest();
    void ShowNetCfg();
    void ShowFormMVB();
    void ShowFormEKE();
    void ShowLogControl();
    void showUserManager();
    void RunFtpTool();

    void OnConfigChanged();
    void on_actionShowLogControl_triggered();
    void on_actionmvb_triggered();
    void on_actionEKE_triggered();
    void on_actionFtpTool_triggered();
    void on_actionLogFile_triggered();
    void on_actionImgSavePath_triggered();
    void closeEvent(QCloseEvent *event) override ;

    void slotShowAvatarLabel();
};
